<template>
  <div>

    <template v-if="item.subs">
      <el-submenu :index="item.path" >
        <template slot="title">
          <i :class="item.iconCode"></i>
          <span slot="title">{{ item.title }}</span>
        </template>
        <template v-for="(items,i) in item.subs">
          <MenuNext :item="items" :key="i"></MenuNext>
        </template>
      </el-submenu>
    </template>
    <template v-else>
  
      <el-menu-item :index="item.path"   @click="show(item.path)" >
        {{ item.title }}
      </el-menu-item>
    </template>

  </div>
</template>

<script>  
import MenuNext from './menu-next.vue'
export default {
  components: { MenuNext },
  props: ["item"],
  name: "MenuNext",
  methods: {
    show(e){
      console.log(e)
    }
  }
}
</script>
<style lang="scss" scoped>

</style>